<?php
@require("php_config_init.php");
@require("php_config_mysql.php");
$goods_id = $_GET["goods_id"];
//sql语句
$sql = "select c.goods_id,c.goods_name,c.goods_price,c.goods_sket,c.goods_sweet,c.goods_smallimg,c.goods_img1,c.goods_img2,c.goods_img3,c.goods_details,c.measure_id,mi.measure,mi.size,mi.num,mi.mount,mi.img,mi.time from goods_info c,measureinfo mi where c.status = 1 and mi.status = 1 and c.measure_id = mi.id and c.goods_id = '$goods_id'";
//执行sql语句
$result = mysql_query($sql);
$obj = array();
//解析一行数据，没有返回false
$item = mysql_fetch_array($result);
$obj["goods_id"] = $item["goods_id"];
$obj["goods_name"] = $item["goods_name"];
$obj["goods_sket"] = $item["goods_sket"];
$obj["goods_price"] = $item["goods_price"];
$obj["goods_sweet"] = $item["goods_sweet"];
$obj["goods_smallimg"] = $item["goods_smallimg"];
$obj["goods_img1"] = $item["goods_img1"];
$obj["goods_img2"] = $item["goods_img2"];
$obj["goods_img3"] = $item["goods_img3"];
$obj["goods_details"] = $item["goods_details"];
$obj["measure_id"] = $item["measure_id"];
$obj["measure"] = $item["measure"];
$obj["size"] = $item["size"];
$obj["num"] = $item["num"];
$obj["mount"] = $item["mount"];
$obj["img"] = $item["img"];
$obj["time"] = $item["time"];
echo json_encode($obj);
?>